<div ng-include="sys_html('common/_header')"></div>
<style>
.mask{
	position: fixed;
	background:rgba(0,0,0,0.5);
	width: 100%;
	height: 100%;
	top: 0;
	text-align: center;
	z-index: 100;
}
.mask .code_box{
	position: absolute;
	margin-top:-10rem;
	top: 50%;
	left: 50%;
	margin-left: -7.5rem;
	width: 15rem;
	height: 20rem;
	background: #fff;
	border-radius:20px;
	line-height: 2.5rem;
	font-size: 0.7rem;
	color: #000;
	font-weight: bold;
}
.mask .code_box img{
	width: 10rem;
	height: 10rem;
}
.mask .code_box .img_box{
	line-height: 3;
	height:auto;
}
.mask .cav_code{
	width: 10rem;
	height: 1.8rem;
	line-height: 1.8rem;
	margin: auto;
	background: #f7f7f7;
	color: #6f6f6f;
}
.mask .error{
	font-size: 0.65rem;
	line-height: 1.2rem;
	font-weight: normal;
	color: #e85a6a;
	margin-top: 0.5rem;
}
</style>
<div class="fui-page order-list-page" ng-if="pagedata.op == 'main'">
	 <div class="jy2-headertopbg">
			<div class="fui-header" style="background:none">
				<div class="fui-header-left">
					<a class="back" style="color:#fff" href="javascript:" ng-click="goback()"></a>
				</div>
				<div class="title bold" style="font-size:1rem;color:#fff">I cancel after verification</div>
				<div class="fui-header-right" style="padding-right:0.5rem;color:#fff" ng-click="access_json('jy_weishop_en/order.verifylist/');">
					<a class="icon icon-delete" style="color:#ddd">其他订单</a>
				</div>
			</div>
	 </div>
	<div class="fui-tab fui-tab-danger jy2-headertop" style="top:2.5rem;margin-top:0">
		<a ng-class="{'external active':pagedata.params.type == 0}" ng-click="pagedata.params.type = 0;tool.get_list('jy_weishop_en/order.verifylist/getlist/',true)">计次核销</a>
		<a ng-class="{'external active':pagedata.params.type == 1}" ng-click="pagedata.params.type = 1;tool.get_list('jy_weishop_en/order.verifylist/getlist/',true)">虚拟(卡密)核销</a>	 
	</div>
	<div class='fui-content order-list' style="margin-top:0.7rem">
		<div class="fui-cell-group fui-list-group order-item" ng-repeat="item in pagedata.list">
                <a class="fui-cell" style="padding: 0.42rem 0.5rem">
                    <div class="fui-cell-info">
                        <div class="subtitle"><i class="icon icon-erweima"></i>  核销码: {{item.verify_code || item.verifycode}}</div>
                    </div>
                    <div ng-if="pagedata.params.type == 1" class="fui-cell-remark noremark">	
						<div ng-show="item.status==1" class='fui-label fui-label-danger' >已使用</div>										
						<div ng-show="item.status==2" class='fui-label fui-label-warning' >已过期</div>											
						<div ng-show="item.status==0" ng-click="pagedata.show_verify(item.url,item.verify_code)" class='fui-label fui-label-default order_detail_code' >点击使用</div>											
						<div ng-show="item.verify_num>0" class='fui-label fui-label-default' >剩余{{item.verify_num}}次</div>
					</div>
					<div ng-if="pagedata.params.type == 0" class="fui-cell-remark noremark">									
						<div ng-show="item.lastverifys<1 && item.status!=3" class='fui-label fui-label-danger'>次数已用完</div>											
						<div ng-show="item.lastverifys>0 && item.status==3" class='fui-label fui-label-warning' >已过期</div>											
						<div ng-show="(item.lastverifys>0 || item.limitnum==0) && item.status!=3" ng-click="pagedata.show_verify(item.url,item.verifycode)" class='fui-label fui-label-default order_detail_code' >点击使用</div>												
						<div ng-show="item.lastverifys>0" class='fui-label fui-label-default' >剩余{{item.lastverifys}}次</div>
						<div ng-show="item.limitnum==0" class='fui-label fui-label-default' >不限次数</div>
					</div>
                </a>
					<div ng-repeat="m in item.merchs">
						<a ng-if="m.id" href="javascript:;" data-nocache="true" ng-click="access_json('jy_weishop_en/merch//id='+m.id)">
							<div class="fui-list-group-title lineblock bold">
								<i class="icon jinyunicon icon-dianpu"></i> {{m.merchname || '多Merch'}}
								<span class="status noremark" style="font-size:0.50rem" ><i class="icon jinyunicon icon-icon-test"></i></span>
							</div>
						</a>
						<a ng-if="!m.id" href="javascript:;" data-nocache="true" ng-click="access_json('jy_weishop_en/index/')">
							<div class="fui-list-group-title lineblock bold">
								<i class="icon jinyunicon icon-dianpu"></i> {{pagedata.shopset.store_title || '平台proprietary'}}
								<span class="status noremark" style="font-size:0.50rem" ><i class="icon jinyunicon icon-icon-test"></i></span>
							</div>
						</a>
						<a href="javascript:;" ng-repeat="g in m.goods" class="external" data-nocache="true" ng-click="access_json('jy_weishop_en/order.detail//id='+item.orderid)">
							<div class="fui-list goods-list">
								<div class="fui-list-media" style="">
									<img class="" ng-src="{{tomedia(g.image) || '../core/resource/images/nopic.jpg'}}">
								</div>
								<div class="fui-list-inner">
									<div class="text goodstitle towline">{{g.title}}</div>
									<div class="text" style="color:#f60;font-size:0.60rem">{{g.selespename || '无规格'}} x {{g.total || 1}} /{{g.unit ||'A'}}<span ng-if="g.weight!='0.00'"> ({{g.weight}}kg)</span></div>
								</div>
								<div class="fui-list-angle" style="width:auto">
									<div>$<span class="marketprice syscolorred">{{g.price}}</span></div>
									<div class="subtitle" ng-if="pagedata.feemoney.isopen==1">{{pagedata.feemoney.tag ||'节省'}}${{g.feemoney || '0.00'}}</div>
								</div>
							</div>
						</a>
					</div>
        </div>
		<div ng-if="pagedata.showmask" class="mask">
			<div class="code_box">
				<p>请将二维码出示给{{pagedata.order.sendtype==1?'配送员':'店员'}}</p>
				<div class="img_box" id="show_verify_ewm">
					
				</div>
				<div class="cav_code" id="show_verify_code">{{pagedata.verify_code}}</div>
				<div class="error">
					<p style="padding: 0 1.3rem">Warm prompt：为了更好的保护您利益,请不要轻易将您的核销二维码泄露给他人</p>
				</div>
				<div>
					<a ng-click="pagedata.showmask=false" class="btn btn-sm btn-default-o order-deleted" style="border-radius:1rem">Shut down</a>
				</div>
			</div>
		</div>
		<div class="content-empty" ng-show="!pagedata.list || pagedata.list.length == 0 ">
		  <i class="icon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i><br/><p style="color: #999;font-size: .75rem">您暂时没有记录！</p>
		</div>
	</div>
</div>
<!-- cancel订单-->
<div ng-if="pagedata.checkcancel" class="popup">
			<div class="popup-body">
			<div class="popup-center" style="border-radius:0.2rem;">
				<div class="fui-page-title" style="margin-top:1rem">Determine要cancel订单吗？</div>
				<div class="fui-page-subtitle" style="margin-top:0.1rem">喜欢的Goods可能随时会被抢空哦</div>
				<div class="modal-footer" style="margin-top:2rem">
					<a ng-click="pagedata.checkcancel=false" class="mod-fail">cancel</a>
					<a href="javascript:" ng-click="post({id:pagedata.orderid},'cancel','id='+pagedata.orderid);pagedata.checkcancel=false" class="mod-success" style="background:{{main.syscolor || 'red'}}">Determine</a>
				</div>
			</div>
			</div>
</div>
<!-- Focus on公众号 -->
<div id="attention" ng-if="pagedata.showwechatcode==1 && pagedata.shopset.followqrcode">
    <div class="attention-alert" style="height: 17.8rem;">
        <div class="attention-img"><img ng-src="{{tomedia(pagedata.shopset.logo) || '../core/resource/images/nopic.jpg'}}" alt=""></div>
        <div class="attention-title">亲爱的上帝，为了您能正常的接收物流信息，请您先Focus on我们的公众号</div>
        <div class="attention-content">
            <div class="col-jy-2" style="text-align: center;"><img ng-src="{{tomedia(pagedata.shopset.followqrcode) || '../core/resource/images/nopic.jpg'}}" style="width: 5.35rem"></div>
            <div class="col-jy-2" style="text-align: center;"><img src="../addons/jy_weishop_en/images/zhiwen.png" style="width: 3.3rem;margin:auto"></div>
            <p >Long press fingerprint diagram qr code</p>
        </div>
        <i class="icon icon-cuowu" ng-click="pagedata.showwechatcode=0" style="font-size:1.5rem;color:#fff;position: absolute;top:105%;left:46%"></i>
    </div>
</div>
<div ng-include="sys_html('common/_coupon',true)"></div>
<div ng-include="sys_html('common/_h5game',true)"></div>
<div ng-include="sys_html('common/_footer')"></div>
<div ng-include="sys_html('common/_menu')"></div>
<script>
scope.tool.get_list('jy_weishop_en/order.verifylist/getlist/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_weishop_en/order.verifylist/getlist/');
}
scope.pagedata.show_verify=function(url,code){
	scope.tool.qr(url,'show_verify_ewm',150)
	scope.pagedata.verify_code=code
	scope.pagedata.showmask=true
	scope.$evalAsync();
}	
$('.mask').click(function(){
	scope.pagedata.showmask=false
	scope.$evalAsync();
})
</script>